package com.scrcu.cloud.wechat.home.endpoint.staff.controller;


import com.scrcu.cloud.wechat.home.endpoint.common.model.RestResponse;
import com.scrcu.cloud.wechat.home.endpoint.staff.service.IStaffOaService;
import com.scrcu.cloud.wechat.home.endpoint.staff.service.IStaffService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Slf4j
@RestController
@RequestMapping("/staffOa")
public class StaffPersonController {


    @Resource
    private IStaffOaService iStaffOaService;

    @PostMapping("/getPersonInfo")
    public RestResponse getPersonInfo(@RequestParam("openid") String openid){
        return iStaffOaService.getPersonInfo(openid);
    }

    @PostMapping("/changePersonInfo")
    public RestResponse changePersonInfo(@RequestParam("openid") String openid,
                                         @RequestParam("mopenid") String mopenid,
                                         @RequestParam("todoType") Integer todoType,
                                         @RequestParam("value") String value){
        return iStaffOaService.changePersonInfo(openid,mopenid,todoType,value);
    }
}
